useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_17'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() +  'protoStoreSales3im.bin')
		click('Edit1')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'Tree,0')
		select_menu('Expand Tree')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'Tree,1')
		select_menu('Expand Tree')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'Tree,3')
		select_menu('Fully Expand Tree')
		select('LayoutCombo', 'Product')
		select_menu('Edit>>Show / Hide Fields')
		select('Table', 'cell:Show,0(true)')
		select('Table', 'cell:Show,1(true)')
		select('Table', 'cell:Show,2(true)')
		click('Go')
		assert_p('JTreeTable', 'Content', '[[, , ], [, , ], [, , ], [, , ], [, , ], [, , 19000], [, , -19000], [, , 5010], [, , 19000], [, , -19000], [, , 5010], [, , ], [, , ], [, , ], [, , ], [, , ], [, , ], [, , ], [, , ], [, , ]]')
		select_menu('Edit>>Show / Hide Fields')
		select('Table', 'cell:Show,0(false)')
		select('Table', 'cell:Show,1(false)')
		click('Go')
		assert_p('JTreeTable', 'Content', '[[, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , 69684558, 40118, 19000], [, , 69684558, 40118, -19000], [, , 69684558, 40118, 5010], [, , 69694158, 40118, 19000], [, , 69694158, 40118, -19000], [, , 69694158, 40118, 5010], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ]]')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'keycode,7')
		select_menu('Show Column>>quantity')
		assert_p('JTreeTable', 'Content', '[[, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , 69684558, 40118, 1, 19000], [, , 69684558, 40118, -1, -19000], [, , 69684558, 40118, 1, 5010], [, , 69694158, 40118, 1, 19000], [, , 69694158, 40118, -1, -19000], [, , 69694158, 40118, 1, 5010], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ]]')
		select_menu('Edit>>Show / Hide Fields')
		select('Table', 'cell:Show,0(true)')
		select('Table', 'cell:Show,1(true)')
		select('Table', 'cell:Show,2(true)')
		click('Go')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'Tree,6')
		assert_p('JTreeTable', 'Content', '[[, , ], [, , ], [, , ], [, , ], [, , ], [, , 19000], [, , -19000], [, , 5010], [, , 19000], [, , -19000], [, , 5010], [, , ], [, , ], [, , ], [, , ], [, , ], [, , ], [, , ], [, , ], [, , ]]')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'Tree,6')
		select_menu('Show Column>>quantity')
		assert_p('JTreeTable', 'Content', '[[, , , ], [, , , ], [, , , ], [, , , ], [, , , ], [, , 1, 19000], [, , -1, -19000], [, , 1, 5010], [, , 1, 19000], [, , -1, -19000], [, , 1, 5010], [, , , ], [, , , ], [, , , ], [, , , ], [, , , ], [, , , ], [, , , ], [, , , ], [, , , ]]')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'quantity,7')
		select_menu('Show Column>>saleDate')
		assert_p('JTreeTable', 'Content', '[[, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , 40118, 1, 19000], [, , 40118, -1, -19000], [, , 40118, 1, 5010], [, , 40118, 1, 19000], [, , 40118, -1, -19000], [, , 40118, 1, 5010], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ]]')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'quantity,7')
		select_menu('Show Column>>keycode')
		assert_p('JTreeTable', 'Content', '[[, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , 69684558, 40118, 1, 19000], [, , 69684558, 40118, -1, -19000], [, , 69684558, 40118, 1, 5010], [, , 69694158, 40118, 1, 19000], [, , 69694158, 40118, -1, -19000], [, , 69694158, 40118, 1, 5010], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ]]')
		select_menu('Edit>>Show / Hide Fields')
		select('Table', 'cell:Show,0(true)')
		select('Table', 'cell:Show,1(true)')
		select('Table', 'cell:Show,2(true)')
		select('Table', 'cell:Show,3(true)')
		click('Go')
		assert_p('JTreeTable', 'Content', '[[, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ], [, ]]')
		select_menu('Edit>>Show / Hide Fields')
		select('Table', 'cell:Show,1(false)')
		select('Table', 'cell:Show,2(false)')
		select('Table', 'cell:Show,3(false)')
		click('Go')
		assert_p('JTreeTable', 'Content', '[[, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , 40118, 1, 19000], [, , 40118, -1, -19000], [, , 40118, 1, 5010], [, , 40118, 1, 19000], [, , 40118, -1, -19000], [, , 40118, 1, 5010], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ]]')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'saleDate,8')
		select_menu('Show Column>>keycode')
		assert_p('JTreeTable', 'Content', '[[, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , 69684558, 40118, 1, 19000], [, , 69684558, 40118, -1, -19000], [, , 69684558, 40118, 1, 5010], [, , 69694158, 40118, 1, 19000], [, , 69694158, 40118, -1, -19000], [, , 69694158, 40118, 1, 5010], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ]]')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table', 'false', 'Show,0')
		select('Table', 'cell:Show,0(false)')
##		select('Table', 'false', 'Show,1')
		select('Table', 'cell:Show,1(false)')
		select('Table', 'cell:Show,2(true)')
		select('Table', 'cell:Show,3(true)')

		click('Go')
		select_menu('Edit>>Show / Hide Fields')
		select('Table', 'cell:Show,2(false)')
		select('Table', 'cell:Show,3(false)')
		click('Go')
		assert_p('JTreeTable', 'Content', '[[, , , ], [, , , ], [, , , ], [, , , ], [, , , ], [, , 1, 19000], [, , -1, -19000], [, , 1, 5010], [, , 1, 19000], [, , -1, -19000], [, , 1, 5010], [, , , ], [, , , ], [, , , ], [, , , ], [, , , ], [, , , ], [, , , ], [, , , ], [, , , ]]')
		select_menu('Edit>>Show / Hide Fields')
		select('Table', 'cell:Show,1(false)')
		click('Go')
		assert_p('JTreeTable', 'Content', '[[, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , 40118, 1, 19000], [, , 40118, -1, -19000], [, , 40118, 1, 5010], [, , 40118, 1, 19000], [, , 40118, -1, -19000], [, , 40118, 1, 5010], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ], [, , , , ]]')
		select_menu('Edit>>Show / Hide Fields')
		assert_p('Table', 'Content', '[[keycode, false], [saleDate, true], [quantity, true], [price, true]]')
##		select('Table', 'true', 'Show,0')
		select('Table', 'cell:Show,0(true)')

##		zzzzz
		click('Go')
		assert_p('JTreeTable', 'Content', '[[, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , 69684558, 40118, 1, 19000], [, , 69684558, 40118, -1, -19000], [, , 69684558, 40118, 1, 5010], [, , 69694158, 40118, 1, 19000], [, , 69694158, 40118, -1, -19000], [, , 69694158, 40118, 1, 5010], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ]]')
##		assert_p('JTreeTable', 'Content', '[[, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , 69684558, 40118, 1, 19000], [, , 69684558, 40118, -1, -19000], [, , 69684558, 40118, 1, 5010], [, , 69694158, 40118, 1, 19000], [, , 69694158, 40118, -1, -19000], [, , 69694158, 40118, 1, 5010], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ], [, , , , , ]]')
	close()
